﻿using HelenServer.UserCenter.Contracts;

namespace HelenServer.UserCenter.Services;

[Injection(typeof(IPositionService))]
public class PositionService : IPositionService
{
    private readonly IDalPositionService _service;

    public PositionService(IDalPositionService service)
    {
        _service = service;
    }

    public async Task<OperationResult<int>> AddAsync(Operation<PositionCreateModel> operation, CancellationToken cancellationToken)
    {
        return await _service.AddAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddRangeAsync(Operation<IEnumerable<PositionCreateModel>> operation, CancellationToken cancellationToken)
    {
        return await _service.AddRangeAsync(operation, cancellationToken);
    }

    public async Task<OperationResult<int>> AddIdentityRangeAsync(Operation<IEnumerable<PositionCreateModel>> operation, CancellationToken cancellationToken)
    {
        return await _service.AddIdentityRangeAsync(operation, cancellationToken);
    }
}